package com.fxm.service.feign;

import com.fxm.config.feign.WeChartFeignConfig;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author fxm
 * @version V1.0.0
 * @description: 微信官方接口
 * @date 2020/12/29 09:29
 */
@FeignClient(name = "weChartFeignClient",url = "${wx.url}", configuration = WeChartFeignConfig.class)
public interface WeChartFeignClient {

    /**
     * 获取用户登陆的session
     * @param appid
     * @param secret
     * @param js_code
     * @param grant_type
     * @return
     */
    @GetMapping(value = "/sns/jscode2session")
    public String getSessionKeyAndOpenId(@RequestParam(value = "appid") String appid,
                                         @RequestParam(value = "secret") String secret,
                                         @RequestParam(value = "js_code") String js_code,
                                         @RequestParam(value = "grant_type") String grant_type);

}
